Skip to content

refactor: replace SensorBox architecture - #44

Closed
Foxpace wants to merge 2 commits into
codex/sensorbox-refactor-30-remove-modulesfrom
sensorbox-refactor
Closed

refactor: replace SensorBox architecture#44
Foxpace wants to merge 2 commits into
codex/sensorbox-refactor-30-remove-modulesfrom
sensorbox-refactor

Conversation

@Foxpace

@Foxpace Foxpace commented Aug 15, 2026

Copy link
Copy Markdown
Owner

This PR replaces the 30 lower layers in the original SensorBox refactor stack, PRs #14 through #43. PR #44 is now the only review target.

The base is master, so GitHub's Files changed view shows the final repository state. Intermediate interfaces and implementations removed by the architecture pass are not part of the review diff.

What changed

  • Added the pure Kotlin core-common and recording-core modules.
  • Standardized expected outcomes on AppResult<T> with stable, data-only application errors.
  • Added private rotating diagnostics that users can view, copy, share, export, or clear from Settings.
  • Kept Android recording adapters in sensorservices and removed its Wear transport dependency.
  • Replaced the Wear command protocol with strict version 2 prepare, commit, abort, stop, and correlated acknowledgements.
  • Added phone-owned, all-or-nothing paired recording coordination with stable source order, retries, timeouts, and compensation.
  • Split phone presentation state by onboarding, recording, and settings workflows.
  • Moved command behavior into typed phone and watch handlers, leaving listener services as decode-and-dispatch boundaries.
  • Added ADRs and the implementation checklist in docs/architecture-refactor-plan.md.

Earlier review feedback

PR #14 contains the only review threads in the old stack. Its AppDiagnostics threads target a class deleted by this change and replaced by FileDiagnostics plus the Settings diagnostics flow. The preference grouping and NativeDocumentStorage API notes still refer to current code, so they remain visible in #14 and should be judged against their current implementations in this PR.

Validation

  • ./gradlew testDebugUnitTest lintDebug assembleDebugAndroidTest assembleDebug detekt
  • ./gradlew :core-common:test :recording-core:test
  • tools/emulator/run_phone_sensor_test.sh: OK (1 test)
  • Wear-to-phone APKs and instrumentation suites compile. The runtime workflow reaches its pairing precondition, but SensorBox_Wear_API_37 still needs one-time phone/watch pairing in Android Studio before tools/emulator/run_wear_sync_test.sh can run.

@Foxpace Foxpace changed the title sensorbox refactor docs: update refactor documentation and emulator tools Aug 15, 2026
@Foxpace
Foxpace marked this pull request as ready for review August 15, 2026 21:51
@Foxpace Foxpace changed the title docs: update refactor documentation and emulator tools refactor: replace SensorBox architecture Aug 19, 2026

Foxpace commented Aug 19, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #46, which targets master and shows the final current tree. Closing this stacked layer so review stays on the consolidated diff; this PR remains available as history.

@Foxpace Foxpace closed this Aug 19, 2026

Foxpace commented Aug 19, 2026

Copy link
Copy Markdown
Owner Author

Stack restored at the author's request. This PR is again part of the original 31-layer refactor chain. The architecture work continues as stacked PRs #47 through #54; consolidated PR #46 is superseded.

Foxpace commented Aug 19, 2026

Copy link
Copy Markdown
Owner Author

GitHub would not reopen this PR after the required branch restoration. It is replaced by #55 on the same sensorbox-refactor head and original base. The architecture stack continues in #47 through #54.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant